package com.motong.gongdan.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.motong.gongdan.entity.Departments;
import com.motong.gongdan.entity.User;
import com.motong.gongdan.vo.resp.NameVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

    List<Integer> selectIdsByNameList(@Param("list") List<String> list);

    List<User> getUserNameAndId(@Param(Constants.WRAPPER)Wrapper<User> wrapper);

    List<NameVo> getList(@Param(Constants.WRAPPER)Wrapper<NameVo> wrapper);

    List<Departments> getDepByUserId(@Param("userId")String userId);

    List<User> getUserList(@Param("name") String name, @Param("list") List<String> userIds);

    @InterceptorIgnore(tenantLine = "true")
    void delAll(@Param("factoryId") Integer factoryId);

}
